import { createStore,applyMiddleware } from 'redux'
import rootReduce from './reducers/root.reducer'
// import logger from './middleware/logger'
// import test from './middleware/test'
// import thunk from './middleware/thunk' 
// import thunk from 'redux-thunk'
import  createSagaMiddleleware from 'redux-saga'
import rootSaga from './sagas/root.saga'

const sageMiddleware = createSagaMiddleleware()

export const store = createStore(rootReduce,applyMiddleware(sageMiddleware))

// 启动counterSaga
sageMiddleware.run(rootSaga)